#{extends 'layout.html'/}
#{set 'menu'}
<ul>
    <li id="home"><a href="@{Application.index()}">HOME</a></li>
    #{secure.check models.Profile.SUPERADMIN}
        <li id="events"><a href="/events/list">Gestionar Eventos</a></li>
        <li id="events"><a href="/auditoriums/list">Gestionar Auditorios</a></li>
        <li id="people"><a href="/people/list">Gestionar Personas</a></li>
    #{/secure.check}

</ul>
#{/set}
#{set 'moreScripts'}
<script type="text/javascript">
    $(document).ready(function () {
        var currentUrl = $(location).attr('href');
        var layer = $(location).attr('href').match('(\\/[\\da-zA-Z:0-9\\.-]+\\/)([\\da-z\\.-]+)(\\/[\\da-z\\.-]+)()');
//        var layer = $(location).attr('href').match('(\\/)([\\da-zA-Z:0-9\\.-]+)(\\/)');
        if (layer == null) {
            layer = 'home';
        } else {
            layer = layer[2];
        }

        var text = $('#' + layer + ' a').text();
        $('#' + layer).addClass("active");
        $('#' + layer + ' a').remove();
        $('#' + layer).html("<strong>" + text + "</strong>");
    });
</script>
#{/set}
#{doLayout /}